package cn.melon.view.control;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import cn.melon.mod.library.LibraryRequest;
import cn.melon.window.MainWindow;

/**
 * @ClassName: LendBookLonger
 * @author Hzy
 * 监听器，在用户点击续借按钮后，通知服务器用户要求续借的请求
 */
public class LendBookLonger implements ActionListener{
    private String studentNum;
    private String bookID;

    LibraryRequest request;
    public LendBookLonger(String studentNum,String bookID, MainWindow m){
        this.studentNum = studentNum;
        this.bookID = bookID;
        request = new LibraryRequest(m);

    }
    @Override
    public void actionPerformed(ActionEvent e){
//        通知服务器端该本书用户要求续借
        request.reNew(bookID);
    }
}
